import { ApiProperty } from '@nestjs/swagger'
import { IsNumber, IsOptional, IsString } from 'class-validator'
import { PagerDto } from '~/common/dto/pager.dto'

export class QueryBookDto extends PagerDto {
  @ApiProperty({ description: '书籍名称', required: false })
  @IsString()
  @IsOptional()
  bookName?: string

  @ApiProperty({ description: '学级，0 幼儿园，1-6 小学，7-8 初中', required: false })
  @IsNumber()
  @IsOptional()
  bookGrade?: number

  @ApiProperty({ description: '标签ID', required: false })
  @IsNumber()
  @IsOptional()
  tagId?: number
}
